/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.base;

import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Types;

/**
 *
 * @author SSANCHEZ
 */
public class LLamarprocedimientos {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        ConexionOracle conexionOracle=new ConexionOracle();
     
        Connection connection=conexionOracle.Conectar();
        CallableStatement callableStatement=connection.prepareCall("{? = call CPK_API_CONSULTA_PREDIOS.CPP_CONSULTA_PREDIO(?)}");
        callableStatement.registerOutParameter(1, Types.CLOB);
        callableStatement.setString(2, "9");
        callableStatement.execute();
            Clob colb=callableStatement.getClob(1);
            String resultado = colb.getAsciiStream().toString();
            System.out.println(resultado);
            connection.close();
        conexionOracle.Conectar().close();
        
    }
}
